<template>
  <div id="app">

    <div class="container-fluid">

      <div class="row">
        <div class="col-3">
          <users></users>
        </div>
        <div class="col-9">
          <ul class="nav nav-tabs">
            <li class="nav-item">
              <a class="nav-link" :class="{active : page === 'upload'}" href="javascript:void(0)"
                 @click="page='upload'">Upload</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" :class="{active : page === 'download'}" href="javascript:void(0)"
                 @click="page='download'">Download</a>
            </li>
          </ul>
          <div class="">
            <upload v-if="page === 'upload'"></upload>
            <download v-if="page === 'download'"></download>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>

<script>

  import Upload from './components/Upload'
  import Download from './components/Download'
  import Users from './components/UserList'

  export default {
    name: 'app',
    data () {
      return {
        page: 'upload'
      }
    },
    components: {
      Users, Upload, Download
    }
  }
</script>

<style>
  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
  }

  .upload-wrapper, .download-wrapper {
    width: 100%;

    padding: 20px;
    border: 1px solid #ddd;
    border-top-width: 0;
  }

  .upload-drog, .download-files {
    width: inherit;
    height: 70vh;
    border: 3px dashed #e6e6e6;
    position: relative;
    overflow: auto;
  }

  .card-list {
    width: 120px;
    height: 120px;
    margin: 10px;
    float: left;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  }

  .card-block {
    position: relative;
    overflow: hidden;
  }

  .file-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
  }

</style>
